﻿using JNPF.Basics.Models;
using JNPF.Utils;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace JNPF.Basics.Logic
{
    /// <summary>
    /// 流程可见
    /// 版 本：V3.0.0
    /// 版 权：引迈信息技术有限公司（https://www.jnpfsoft.com）
    /// 作 者：JNPF开发平台组
    /// 日 期：2018.01.17 
    /// </summary>
    public class FlowEngineVisibleBll
    {
        private FlowEngineVisibleIService service = new FlowEngineVisibleService();

        /// <summary>
        /// 列表
        /// </summary>
        /// <param name="flowId">流程主键</param>
        /// <returns></returns>
        public async Task<List<FlowEngineVisibleEntity>> GetList(string flowId)
        {
            try
            {
                return await service.GetList(flowId);
            }
            catch (Exception ex)
            {
                throw ExceptionEx.Throw(ex);
            }
        }
        /// <summary>
        /// 可见流程列表
        /// </summary>
        /// <param name="userId">用户主键</param>
        /// <returns></returns>
        public async Task<List<FlowEngineVisibleEntity>> GetVisibleFlowList(string userId)
        {
            try
            {
                return await service.GetVisibleFlowList(userId);
            }
            catch (Exception ex)
            {
                throw ExceptionEx.Throw(ex);
            }
        }
    }
}
